package com.example.schooljava.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author LDH
 * @since 2022/08/11
 */
@Data
@ApiModel(value = "班级对象", description = "")
@JsonIgnoreProperties(value = {"create_time", "update_time"})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Class implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 班级id
     */
    @ApiModelProperty("主键")
    @TableId(value = "id")
    private Long id;

    /**
     * 班级名称
     */
    @ApiModelProperty("班级名称")
    private Integer name;

    /**
     * 班级所在年级
     */
    @ApiModelProperty("班级所在年级")
    private Integer grade;

    /**
     * 班级班主任id
     */
    @ApiModelProperty("班主任id")
    private Long headmaster;

    /**
     * 班级助理id
     */
    @ApiModelProperty("班级助理id")
    private Long assistant;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Guangzhou")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime create_time;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Guangzhou")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime update_time;


    @TableField(exist = false)
    private Teacher teacher1;
    @TableField(exist = false)
    private Teacher teacher2;
}
